var Cookie = new Object();
Cookie.setCookie = function (C, E, D) {
	var F = C + "=" + encodeURIComponent(E);
	if (D) {
		if (D.expireDays) {
			var B = new Date();
			var A = D.expireDays * 24 * 3600 * 1000;
			B.setTime(B.getTime() + A);
			F += "; expires=" + B.toGMTString();
		} else {
			F += "; expires=" + D;
		}
		if (D.path) {
			F += "; path=" + D.path;
		}
		if (D.domain) {
			F += "; domain" + D.domain;
		}
		if (D.secure) {
			F += "; true";
		}
	}
	document.cookie = F;
};

Cookie.getCookie = function (C) {
	var B = document.cookie.split("; ");
	var E = new Object();
	for (var D = 0; D < B.length; D++) {
		var A = B[D].split("=");
		if (A[0] == C) {
			return decodeURIComponent(A[1]);
		}
	}
	return "";
};

Cookie.deleteCookie = function(A) {
	this.setCookie(A, "", {expireDays: -1})
};

var _VENDOR = Cookie.getCookie("aliyun_com_vendor") || 100109;
var _cV = Cookie.getCookie("aliyun_com_userid");
var _CID = Cookie.getCookie("aliyun_com_cid");

function JSlog(o) {
	o = o || {};
	var e = encodeURIComponent,
			b = new Image(),
			sQ = "",
			sV = "";
	
	if (typeof DEFINED_PARAMS !== "undefined") {
		for (v in DEFINED_PARAMS) {
			if (!o[v]) {
				sQ += v + "=" + DEFINED_PARAMS[v] + "&";
			}
		}
	}
	
	for (v in o) {
		switch (v) {
			case "q":
			case "oq":
			case "bs":
				sV = e(o[v].replace(/<[^<>]+>/g, ""));
			break;
			
			case "u":
				sV = escape(o[v]);
			break;
			
			default:
				sV = o[v];
		}
		sQ += v + "=" + sV + "&";
	}
	
	b.src = "http://log.s.aliyun.com/0.gif?v=" + _VENDOR + (_CID != "" ? "&cid=" + _CID : "") + "&c=" + _cV + "&" + sQ + "vr=3.0.1&t=" + new Date().getTime();
	return true;
}
